#define _CRT_SECURE_NO_WARNINGS 1
#include"RBTree.h"
#include"map.h"
#include"set.h"
#include"iterator.h"
void Test_set()
{
    g::set<int> s;
    s.insert(1);
    s.insert(10);
    s.insert(5);
    s.insert(20);
    s.insert(1);
    g::set<int>::iterator it = s.begin();
    while (it != s.end())
    {
        cout << *it << " ";
        ++it;
    }
    cout << endl;
}
void Test_map()
{
    g::map<int, int>m;
    m.insert(make_pair(1, 1));
    m.insert(make_pair(3, 3));
    m.insert(make_pair(1, 1));
    m.insert(make_pair(5, 5));
    g::map<int, int>::iterator it = m.begin();
    while (it != m.end())
    {
        cout << it->first << ":" << it->second << " ";
        ++it;
    }
    cout << endl;
}
int main()
{
    //Test_set();
    Test_map();
}